﻿/*
    File name:          IDatabase.cs
    File type:          Interface
    Author:             Jakob Sulby 09136
    Creation date:      24-03-2011
    Last modified:      16-05-2011
    Last modified by:   Jakob Sulby 09136
    Description:        IDatabase is an interface which enable the project to switch to another type of database.
*/

using System;
using System.Collections.Generic;

namespace i4pro_gruppe_d.Database
{
    using Types;
    public interface IDatabase
    {
        //Bricks
        bool WriteBrick(Brick brick);
        List<Brick> ReadBrick(DateTime date);
        bool UpdateBrick(Brick brick);

        //Programmer tab
        Script ReadScript(string scriptName);
        List<String> ReadScriptNames();
        bool WriteScript(Script script);
        bool RemoveScript(string script);

        //Batch calls
        bool NewBatch(DateTime startTime, DateTime finishTime);
        bool SetBatchEndTime(DateTime finishTime);
        bool WriteRobot(Robot robot);

        //Eventlog
        bool WriteEventLog(EventLog eventLog);
        List<Log> ReadLog(DateTime dateTime);

        //User
        bool UpdateUser(User user, String oldUserName);
        bool NewUser(User user);
        int GetUserRights(User user);
        List<User> getUserList();
        bool DeleteUser(User user);
    }
}